import java.util.Scanner;

public class Three{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while (scan.hasNextLine()) {
			int sum = 0;
			char c;
			String s1;
			s1 = scan.nextLine();
			for (int i = 0; i < s1.length(); i++) {
				c = s1.charAt(i);
				if (c >= 48 && c <= 57) {
					sum += c - 48;
				}
			}
			System.out.println(sum);
		}
		scan.close();
	}
}